angular.module('${menuCode}')
.controller("${widgetCode}Ctrl",function($scope,AppKit){
	var url = '/portal/resource?MobileLatestMessagesDataProvider&actionType=findLatestMessages&userCode=admin';
	var promise = AppKit.getJsonApi(url);
	promise.success(function(rspJson){
		$scope.receiveMessages = rspJson.receiveMessages;
		$scope.sendMessages = rspJson.sendMessages;
	});
	
	$scope.openModal = function(id,text,category) {
		$scope.currentId = id;
		$scope.modalTitle = text;
		$scope.category = category;
		AppKit.createModal("msg-modal",$scope);
	}
	
	$scope.setActiveTab = function (activeTab) {     
		　　$scope.activeTab = activeTab; 
	}	
});